package tabs;

import impsoft.scripting.ibot.builtin.tabs.TabSkelton;
import base.DreamScript;
import base.DreamUtility;

public class TabHandler extends DreamUtility {

	public TabHandler(DreamScript cs) {
		super(cs);
	}

	public void setTab(TabSkelton tab) throws InterruptedException {
		if (!tab.isSelected()) {
			if (cs.random(0, 10) == 0) {
				tab.setSelected();
			} else {
				tab.click();
			}

			if (!tab.isSelected()) {
				tab.click();
			}
		}
	}
}
